<% breadcrumb :dashboard_design_cases %>

<div class="dashboard-designers-cases">
  <div class="row menu-list-row">
    <div class="col-sm-3">
      <%= render partial: 'dashboard/left_menu' -%>
    </div>

    <div class="col-sm-9">
      <%= render partial: 'shared/designer_info' %>

        <div class="row case-list">
          <div class="col-xs-4 item">
            <div class="new">
              <div class="inset-border">
                <a href="<%= new_dashboard_design_case_path %>">
                  <i class="fa fa-camera"></i>
                  <h1>添加案例</h1>
                </a>
              </div>
            </div>
          </div>

          <% @design_cases.each do |design_case| %>
            <div class="col-xs-4 item">
              <a href="/dashboard/designers/design_cases/new?id=<%= design_case.id %>">
                <img src="<%= design_case.design_case_attachments.length == 0 ? image_path('new-home/zuopin.png') : design_case.design_case_attachments.first.image_url %>" alt="">
              </a>
              <a href="#" class="delete-op">删除</a>
              <%= link_to "删除", dashboard_design_case_path(design_case), method: :delete, 'data-confirm': "确认删除吗?", class: "delete-op" %>
              <div class="row margin-reset info text-center">
                <a href=""><h1><%= design_case.title %>（单位：万元）</h1></a>
                <div class="col-xs-4 padding-reset">
                  <div class="spend">￥<%= design_case.total_amount %></div>
                  <div class="spend-info">全屋花费</div>
                </div>
                <div class="col-xs-4 padding-reset">
                  <div class="spend"><%= design_case.area %>㎡</div>
                  <div class="spend-info">门窗面积</div>
                </div>
                <div class="col-xs-4 padding-reset">
                  <div class="spend">￥<%= design_case.window_and_door_budget %></div>
                  <div class="spend-info">门窗预算</div>
                </div>
              </div>
            </div>
          <% end %>

        </div>
    </div>
  </div>
</div>

